using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using admin.core.Entities.App;

namespace admin.application.Services
{
    public interface IAppImageService
    {
        Task<string> SaveImageAsync(Stream fileStream, string extension);
        Task<long> SaveImageInfoAsync(string fileName, string originalFileName, string filePath, string fileExtension, long fileSize, string contentType, string url, DateTime uploadTime, string? tags = null, string? description = null, Guid? userId = null);
        Task<long> SaveImageInfoAsync(AppImage image);
        Task<AppImage?> GetImageByFileNameAsync(string fileName);
        Task<IEnumerable<AppImage>> GetImagesByUserIdAsync(Guid userId);
        Task<bool> DeleteImageAsync(Guid imageId);
        // 批量获取用户头像（只取每个用户的头像图片，未找到则为null）
        Task<Dictionary<Guid, AppImage?>> GetAvatarsByUserIdsAsync(IEnumerable<Guid> userIds);
        Task<long> UpdateImageInfoAsync(AppImage image);
    }
} 